cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(recipe-06 LANGUAGES C CXX)                                                      # 设置编译预言是C、C++

message(STATUS "Is the C++ compiler loaded?" ${CMAKE_CXX_COMPILER_LOADED})
if (CMAKE_CXX_COMPILER_LOADED)  # 内置变量
    message(STATUS "The C++ compiler ID is: ${CMAKE_CXX_COMPILER_ID}")                  # 编译器厂商
    message(STATUS "Is the C++ come from GNU : ${CMAKE_COMPILER_IS_GNUCXX}")            # 是够来自于GNU
    message(STATUS "The C++ compiler version is: ${CMAKE_CXX_COMPILER_VERSION}")        # 版本号
endif ()

message(STATUS "Is the C compiler loaded?" ${CMAKE_C_COMPILER_LOADED})
if (CMAKE_C_COMPILER_LOADED)  # 内置变量
    message(STATUS "The C compiler ID is: ${CMAKE_C_COMPILER_ID}")                      # 编译器厂商
    message(STATUS "Is the C come from GNU : ${CMAKE_COMPILER_IS_GNUCC}")               # 是够来自于GNU
    message(STATUS "The C compiler version is: ${CMAKE_C_COMPILER_VERSION}")            # 版本号
endif ()
